Skip to content

Conversation

barw4
Copy link
Contributor

@barw4 barw4 commented Oct 1, 2025

🎫 Issue IBX-10735

Related PRs:

ibexa/core#633

Description:

This PR replaces the old ArrayAdapter with a dedicated one that utilizes a new findContentTypes PAPI contract.

For QA:

We need to check whether the content type list behaves exactly the same as before, potentially we could check what's the performance gain.

Documentation:

@barw4 barw4 force-pushed the use-findContentTypes-in-content-type-list branch from e991be0 to 0462d36 Compare October 6, 2025 07:33
@barw4 barw4 added the Feature New feature request label Oct 6, 2025
@barw4 barw4 changed the title Used new findContentTypes PAPI contract in content type list Leverage new Content Type Search API Oct 6, 2025
@barw4 barw4 requested a review from a team October 6, 2025 12:54
@ezrobot ezrobot requested review from adamwojs, mikadamczyk, Steveb-p, alongosz, ciastektk, ViniTou, wiewiurdp, konradoboza and tbialcz and removed request for a team October 6, 2025 12:54
@barw4 barw4 requested a review from konradoboza October 6, 2025 12:56

$adapter = new ContentTypeListAdapter($this->contentTypeService, $languages);

self::assertEquals(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self::assertEquals(
self::assertSame(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertSame doesn't seem to work, these won't be exactly the same types?

$this->contentTypeService
->expects(self::once())
->method('findContentTypes')
->with($this->isInstanceOf(ContentTypeQuery::class), $languages)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may also want to make the check more specific, utilizing

self::callback(function (ContentTypeQuery $query): bool {
    // ...
    return true;
})

constraint.

Suggested change
->with($this->isInstanceOf(ContentTypeQuery::class), $languages)
->with(self::isInstanceOf(ContentTypeQuery::class), $languages)

Copy link

sonarqubecloud bot commented Oct 6, 2025

@barw4 barw4 changed the title Leverage new Content Type Search API IBX-10735: Leverage new Content Type Search API Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature request Ready for QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants